<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>查看子导航</title>
    <link rel="stylesheet" type="text/css"
			href="<%=basePath%>jslib/bootstrap/css/bootstrap.css">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>css/theme.css">
		<link rel="stylesheet"
			href="<%=basePath%>jslib/font-awesome/css/font-awesome.css">
		<script src="<%=basePath%>jslib/jquery-1.7.2.min.js"
			type="text/javascript"></script>
    
	

  </head>
  
 <body class="content1">
		<div class="header">
			<h1 class="page-title">
				二级导航管理
			</h1>
		</div>
		<ul class="breadcrumb">
			<li>
				<a href="<%=basePath%>/sys/welcome.jsp">Home</a>
				<span class="divider">/</span>
			</li>
			<li class="active">
				二级导航列表
			</li>
		</ul>
		<div class="container-fluid">
			<div class="row-fluid">
			<div class="btn-toolbar">
						
						<a href="<%=basePath%>sys/nav?cmd=listfirst" class="btn">返回</a>

					</div>
				

				<div class="well">
					<table class="table">
						<thead>
							<tr>
			
								<th>
									导航名称
								</th>
								<th>
									排序序号
								</th>
								<th>
									状态
								</th>
								<th style="width: 90px;" >
									编辑
								</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${pager.list}" var="item">
								<tr>
									<td>
										${item.name}
									</td>
									<td>
										${item.orders}
									</td>
									<td>
									<c:if test="${item.navstate==1}">正常</c:if>
									<c:if test="${item.navstate!=1}">禁用</c:if>
										
									</td>
									<td >
										<a href="<%=basePath%>sys/nav?cmd=toeditsub&nid=${item.nid}&pid=${item.pid}">编辑</a>
										&ensp;
									
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
								<div class="pagination pagination-right">
						<ul>
							<li>
								<a>共计：${pager.pagectrl.pagecount}页/${pager.pagectrl.rscount}条记录</a>
							</li>
							
							<li>
								<c:if test="${pager.pagectrl.currentindex==1}" var="fp">
									<a style="disabled:true">上一页</a>
								</c:if>
								<c:if test="${!fp}">
									<a href="<%=basePath%>sys/nav?cmd=listsub&nid=${param.nid}&index=${pager.pagectrl.currentindex-1}">上一页</a>
								</c:if>
							</li>						
							
							<c:forEach begin="${pager.pagectrl.minpage}" step="1" end="${pager.pagectrl.maxpage}" var="index">
							<li>
								<c:if test="${pager.pagectrl.currentindex==index}" var="t">
									<a style="color:red;background-color:#bbb">${index}</a>
								</c:if>
								<c:if test="${!t}">
								<a href="<%=basePath%>sys/nav?cmd=listsub&nid=${param.nid}&index=${index}">${index}</a>
								</c:if>
							</li>
							</c:forEach>
							
							<li>
								<c:if test="${pager.pagectrl.currentindex==pager.pagectrl.pagecount}" var="fp">
									<a style="disabled:true">下一页</a>
								</c:if>
								<c:if test="${!fp}">
									<a href="<%=basePath%>sys/nav?cmd=listsub&index=${pager.pagectrl.currentindex+1}&nid=${param.nid}">下一页</a>
								</c:if>
							</li>
						</ul>
					</div>
			
				</div>
			</div>
		</div>
	</body>
</html>
